#ifndef __DETU_MEDIA_SNAP_MGR_IMP_H__
#define __DETU_MEDIA_SNAP_MGR_IMP_H__

#include "snap_mgr.h"
#include "singleton.h"
#include "mutex.h"

#include <vector>
#include <map>

#include "hi_dsp.h"
#include "hi_comm_photo.h"
#include "hi_type.h"
#include "hi_comm_video.h"
namespace detu_media
{
class SnapMgrImp:public SnapMgr
{
PATTERN_SINGLETON_DECLARE(SnapMgrImp)

public:
	virtual S_Result snap(const Json::Value& snapList, StreamMap& streams, const Uint32_t count = 1);
    
private:
    S_Result LoadDspCoreBinary(SVP_DSP_ID_E enCoreId);
    S_Result UnloadDspCoreBinary(SVP_DSP_ID_E enCoreId);
    S_Result PhotoSnapInit(PHOTO_ALG_TYPE_E enAlgType,SVP_DSP_ID_E enCoreId,HI_U32 u32Width, HI_U32 u32Height);
    S_Result PhotoSnapProcess(PHOTO_ALG_TYPE_E enAlgType, VIDEO_FRAME_INFO_S *pSrcVideoFrame, HI_U32 size);
    S_Result PhotoSnapDeinit(PHOTO_ALG_TYPE_E enAlgType,SVP_DSP_ID_E enCoreId);

private:
	detu_infra::Mutex fMutex;
};

}

#endif
